/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.farmcode.api.plugin;

import com.farmcode.api.util.FARMCodeAPI;
import java.io.IOException;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Oscar Ivan Prado
 */
public class PluginImpl implements Plugin {

    protected Properties context;

    public PluginImpl() {
        context = new Properties();
    }

    @Override
    public void configure() throws ConfigureException {
    }

    @Override
    public void configure(String path) throws ConfigureException {
        try {
            configure(FARMCodeAPI.getPluginContext(path));
        } catch (IOException ex) {
            Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
        }   
    }

    @Override
    public void configure(Properties properties) throws ConfigureException {
        context = properties;
    }
}
